#ifndef _server_h
#define _server_h

class SSLServer
{
  public:
    SSLServer(const char* keyfile, const char* passw, int port, void (*handler)(SSL* ssl, int sock));

    ~SSLServer();

    void WaitForConnection();

  private:
    int port;
    void (*handler)(SSL* ssl, int sock);
    SSL_CTX *ctx;
};

int tcp_listen(int port);
void load_dh_params(SSL_CTX *ctx,const char *file);
void generate_eph_rsa_key(SSL_CTX *ctx);

#endif

